<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserExtract extends Model
{
    use HasFactory;
    protected $table='user_extract';
    protected $guarded=[];

    public static function createExtract($uid,$user_infor,$audit,$code,$price){
        return self::insert([
            'uid'=>$uid,
            'real_name'=>$user_infor['real_name'],
            'extract_type'=>'bank',
            'bank_code'=>$code,
            'bank_address'=>$audit['bancardInfor']['bankName'],
            'extract_price'=>$price,
             'status'=>1,
            'add_time'=>time()
        ]);
    }
}
